|
|
|
|
|
|
|
Public Sub connectToDataSource(argConnString As String)
Public Sub setCrystalControl(argCrystalControl _
As CrystalReport)
Public Sub setQuery(argQuery As String) |
|
|
|
|
|
|
|
|
ReportController is probably best described as the headquarters of all functionality exhibited by this subsystem. It owns a reference to the main report form, frmReport, as well as references to the IReporting class of objects. It has many methods it implements, including |
|
|
|
|
|
|
|
|
Public Sub clickedOpenReport(Optional argReportName _
As String, Optional argReportType As Byte)
Public Sub clickedPrintReport()
Public Sub clickedSaveReport()
Public Sub enableTabStops(argValue As Boolean)
Public Sub hideForm()
Public Sub processToolbar(argButton)
Private Sub setAccessReporting(argMsg As Byte)
Private Sub setCrystalReporting(argMsg As Byte)
Private Sub setRichTextReporting(argMsg As Byte)
Public Sub showForm()
Public Sub updateProgress(argProgressUnit As Long, _
Optional argMessage As String, Optional argProgressTotal _ As Long) |
|
|
|
|
|
|
|
|
RichTextFile is responsible for handling the interactions with the actual Rich Text Box control. Because of its role in other subsystems, please refer to the lesson for Day 17, The File Operations Subsystem, which describes this class in more detail. |
|
|
|
|
|
|
|
|
RichTextAgent brokers some of the interactions for the RichTextFile. Because it delegates the same methods as RichTextFile, please refer to the lesson for Day 17, which describes this class in more detail. |
|
|
|
|
|
|
|
|
PrinterProxy encapsulates any behavior that is directly related to the printer. It has a single public method, printReport. It is in this class where you would add special calls to the printer as discussed earlier. You could even insert low-level API code in this class if your application's requirements call for it. |
|
|
|
|
|
|
|
|
Methods for the IReporting Class The openReport method is responsible for opening any report. If the information in the report needs to be specially gathered, include that code here. The argRptName argument can be the actual name of the report that Access or Crystal Reports expects, or the filename including the path that the Rich Text Box expects. |
|
|
|
|
|
|
|
|
The printReport method is responsible for printing the report. It delegates the actual printing to the PrinterProxy, but the best use of PrinterProxy is for accessing members of the Printer object in Visual Basic, including hDC (the device context handle for |
|
|
|
|
|